using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._AnalysisTools._Overlay
{
    /// <summary>
    /// <para>Symmetrical Difference</para>
    /// <para>Computes a geometric intersection of the input and update features, returning the input features and update features that do not overlap. Features or portions of features in the input and update features that do not overlap will be written to the output feature class.</para>
    /// <para>计算输入要素和更新要素的几何交集，返回不重叠的输入要素和更新要素。输入要素和更新要素中不重叠的要素或要素的一部分将写入输出要素类。</para>
    /// </summary>    
    [DisplayName("Symmetrical Difference")]
    public class SymDiff : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public SymDiff()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The input feature class or layer.</para>
        /// <para>输入要素类或图层。</para>
        /// </param>
        /// <param name="_update_features">
        /// <para>Update Features</para>
        /// <para>The update feature class or layer. The geometry type must be the same as that of the input feature class or layer.</para>
        /// <para>更新要素类或图层。几何类型必须与输入要素类或图层的几何类型相同。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The feature class to which the results will be written.</para>
        /// <para>将结果写入的要素类。</para>
        /// </param>
        public SymDiff(object _in_features, object _update_features, object _out_feature_class)
        {
            this._in_features = _in_features;
            this._update_features = _update_features;
            this._out_feature_class = _out_feature_class;
        }
        public override string ToolboxName => "Analysis Tools";

        public override string ToolName => "Symmetrical Difference";

        public override string CallName => "analysis.SymDiff";

        public override List<string> AcceptEnvironments => ["MDomain", "MResolution", "MTolerance", "XYDomain", "XYResolution", "XYTolerance", "ZDomain", "ZResolution", "ZTolerance", "autoCommit", "configKeyword", "extent", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "parallelProcessingFactor", "qualifiedFieldNames"];

        public override object[] ParameterInfo => [_in_features, _update_features, _out_feature_class, _join_attributes.GetGPValue(), _cluster_tolerance];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The input feature class or layer.</para>
        /// <para>输入要素类或图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Update Features</para>
        /// <para>The update feature class or layer. The geometry type must be the same as that of the input feature class or layer.</para>
        /// <para>更新要素类或图层。几何类型必须与输入要素类或图层的几何类型相同。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Update Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _update_features { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The feature class to which the results will be written.</para>
        /// <para>将结果写入的要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Attributes to Join</para>
        /// <para><xdoc>
        ///   <para>Specifies the attributes that will be transferred to the output feature class.</para>
        ///   <bulletList>
        ///     <bullet_item>All attributes—All the attributes from the input features will be transferred to the output feature class. This is the default.</bullet_item><para/>
        ///     <bullet_item>All attributes except feature IDs—All the attributes except the FID from the input features will be transferred to the output feature class.</bullet_item><para/>
        ///     <bullet_item>Only feature IDs—Only the FID field from the input features will be transferred to the output feature class.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将传输到输出要素类的属性。</para>
        ///   <bulletList>
        ///     <bullet_item>所有属性—输入要素中的所有属性都将传输到输出要素类。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>除要素 ID 之外的所有属性—输入要素中除 FID 之外的所有属性都将传输到输出要素类。</bullet_item><para/>
        ///     <bullet_item>仅要素 ID - 仅将输入要素中的 FID 字段传输到输出要素类。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Attributes to Join")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _join_attributes_value _join_attributes { get; set; } = _join_attributes_value._ALL;

        public enum _join_attributes_value
        {
            /// <summary>
            /// <para>All attributes except feature IDs</para>
            /// <para>All attributes except feature IDs—All the attributes except the FID from the input features will be transferred to the output feature class.</para>
            /// <para>除要素 ID 之外的所有属性—输入要素中除 FID 之外的所有属性都将传输到输出要素类。</para>
            /// </summary>
            [Description("All attributes except feature IDs")]
            [GPEnumValue("NO_FID")]
            _NO_FID,

            /// <summary>
            /// <para>Only feature IDs</para>
            /// <para>Only feature IDs—Only the FID field from the input features will be transferred to the output feature class.</para>
            /// <para>仅要素 ID - 仅将输入要素中的 FID 字段传输到输出要素类。</para>
            /// </summary>
            [Description("Only feature IDs")]
            [GPEnumValue("ONLY_FID")]
            _ONLY_FID,

            /// <summary>
            /// <para>All attributes</para>
            /// <para>All attributes—All the attributes from the input features will be transferred to the output feature class. This is the default.</para>
            /// <para>所有属性—输入要素中的所有属性都将传输到输出要素类。这是默认设置。</para>
            /// </summary>
            [Description("All attributes")]
            [GPEnumValue("ALL")]
            _ALL,

        }

        /// <summary>
        /// <para>XY Tolerance</para>
        /// <para><xdoc>
        ///   <para>The minimum distance separating all feature coordinates (nodes and vertices) as well as the distance a coordinate can move in x or y (or both).</para>
        ///   <para>Changing this parameter's value may cause failure or unexpected results. It is recommended that this parameter not be modified. It has been removed from view in the tool dialog. By default, the input feature class's spatial reference x,y tolerance property is used.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>分隔所有要素坐标（节点和折点）的最小距离，以及坐标可以在 x 或 y（或两者）中移动的距离。</para>
        ///   <para>更改此参数的值可能会导致失败或意外结果。建议不要修改该参数。它已从工具对话框的视图中删除。默认情况下，将使用输入要素类的空间参考 x，y 容差属性。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("XY Tolerance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _cluster_tolerance { get; set; } = null;


        public SymDiff SetEnv(object MDomain = null, object MResolution = null, object MTolerance = null, object XYDomain = null, object XYResolution = null, object XYTolerance = null, object ZDomain = null, object ZResolution = null, object ZTolerance = null, int? autoCommit = null, object configKeyword = null, object extent = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, object parallelProcessingFactor = null, bool? qualifiedFieldNames = null)
        {
            base.SetEnv(MDomain: MDomain, MResolution: MResolution, MTolerance: MTolerance, XYDomain: XYDomain, XYResolution: XYResolution, XYTolerance: XYTolerance, ZDomain: ZDomain, ZResolution: ZResolution, ZTolerance: ZTolerance, autoCommit: autoCommit, configKeyword: configKeyword, extent: extent, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, parallelProcessingFactor: parallelProcessingFactor, qualifiedFieldNames: qualifiedFieldNames);
            return this;
        }

    }

}